/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package testsvn;

import com.google.gson.Gson;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author kienbk1910
 */
public class Testsvn {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
         List<Data> listdata = new ArrayList<Data>();
         Data data1 = new Data("Viet N", 100);
         Data data2 = new Data("L", 100); 
         Data data3 = new Data("campudia", 100);   
         listdata.add(data2);
         listdata.add(data1);
         listdata.add(data3);
         Chart chart1 = new Chart("Dong Duong", listdata);
          List<Data> listdata1 = new ArrayList<Data>();
         Data data4 = new Data("Nhat ban", 123);
         Data data5 = new Data("Han quoc", 456); 
         Data data6 = new Data("trung uoc", 789);   
         listdata1.add(data4);
         listdata1.add(data5);
         listdata1.add(data6);
         Chart chart2 = new Chart("Dong a", listdata1);
         List<Chart>  listchart = new ArrayList<Chart>();
         listchart.add(chart1);
         listchart.add(chart2);
         Gson gson = new Gson();
         System.out.println(gson.toJson(listchart).toString());
        
    }
    
}
